-- GENERATED SPELL FOR [Shattered Hand Houndmaster] --


function spell0_17670(pUnit, Event) --@Impaling Bolt,n/a--
pUnit:FullCastSpellOnTarget(30932,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17670', 11000, 1)
end

function spell1_17670(pUnit, Event) --@Impaling Bolt,n/a--
pUnit:FullCastSpellOnTarget(40248,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17670', 11000, 1)
end

function spell2_17670(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(15620,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17670', 635, 1)
end

function spell3_17670(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(22907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17670', 641, 1)
end

function spell4_17670(pUnit, Event) --@Volley,n/a--
pUnit:FullCastSpellOnTarget(34100,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17670', 6000, 1)
end

function spell5_17670(pUnit, Event) --@Volley,n/a--
pUnit:FullCastSpellOnTarget(35950,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17670', 6000, 1)
end

function Sorts_17670(pUnit, Event)
local choix_sorts_17670 = math.random(0, 5)
if choix_sorts_17670 == 0 then
pUnit:RegisterEvent('spell0_17670', 1, 1)
end
if choix_sorts_17670 == 1 then
pUnit:RegisterEvent('spell1_17670', 1, 1)
end
if choix_sorts_17670 == 2 then
pUnit:RegisterEvent('spell2_17670', 1, 1)
end
if choix_sorts_17670 == 3 then
pUnit:RegisterEvent('spell3_17670', 1, 1)
end
if choix_sorts_17670 == 4 then
pUnit:RegisterEvent('spell4_17670', 1, 1)
end
if choix_sorts_17670 == 5 then
pUnit:RegisterEvent('spell5_17670', 1, 1)
end
end

function mob17670_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17670', math.random(1500, 3000), 1)
end

function mob17670_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17670_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17670_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17670, 1, 'mob17670_Action')
RegisterUnitEvent(17670, 2, 'mob17670_Leave')
RegisterUnitEvent(17670, 3, 'mob17670_Kill')
RegisterUnitEvent(17670, 4, 'mob17670_Die')
